from fractions import Fraction

def float_to_ratio(float_number):
    # 使用Fraction将浮点数转换为分数
    ratio = Fraction(float_number).limit_denominator()
    return ratio

# 示例使用
float_number = float(input())
ratio = float_to_ratio(float_number)
print(f"{ratio}")  # 输出: 4.2 转换为比率是: 21/5